using System;
using System.Xml;
namespace Coding4Fun.Phone.Controls.Data
{
	public class PhoneHelper
	{
		private const string string_0 = "WMAppManifest.xml";
		private const string string_1 = "App";
		public static string GetAppAttribute(string attributeName)
		{
			string result;
			try
			{
				XmlReaderSettings xmlReaderSettings = new XmlReaderSettings();
				xmlReaderSettings.set_XmlResolver(new XmlXapResolver());
				XmlReaderSettings xmlReaderSettings2 = xmlReaderSettings;
				using (XmlReader xmlReader = XmlReader.Create("WMAppManifest.xml", xmlReaderSettings2))
				{
					xmlReader.ReadToDescendant("App");
					if (!xmlReader.IsStartElement())
					{
						throw new FormatException("WMAppManifest.xml is missing App");
					}
					result = xmlReader.GetAttribute(attributeName);
				}
			}
			catch (Exception)
			{
				result = "";
			}
			return result;
		}
	}
}
